<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<script type="text/javascript" src="lib/PIE_IE678.js"></script>
<![endif]-->
<link href="css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="css/H-ui.admin.css" rel="stylesheet" type="text/css" />
<link href="css/style.css" rel="stylesheet" type="text/css" />
<link href="lib/Hui-iconfont/1.0.7/iconfont.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="lib/daterangepicker/daterangepicker.css" /> 

<!--[if IE 6]>
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>提现申请列表</title>
<style type="text/css">
    .td-indexshow span{cursor: pointer;}
    .wenhao{
        width: 20px; height: 20px; border-radius: 100%; border:#d8d8d8 1px solid; font-size: 12px; display: inline-block;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4); color: #999; margin-left: 5px;
    }
    .remark{padding: 3px 5px; border-radius: 5px; border:#d8d8d8 1px solid; font-size: 12px; display: inline-block;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4); color: #999; margin-left: 5px;}
    .t-red{color: #c62b26;}
    .t-hui{color:#999 }

    .reasonblank{
        background-color: #f9f9f9; 
        border:#ddd 1px solid; 
        border-bottom: 0px; 
        height: 500px; 
        border-radius: 3px;
        position: fixed;
        width: auto;
        top: 20%;
        right: 100px; 
        display: none;

        padding-bottom: 50px;
    }
    .reasonblank i{position: absolute; right: -10px; top: -22px; font-size: 30px;}
    .reason{height: 500px;      overflow-y: scroll; display: block;}
    
    .reason .input{position: absolute; bottom: 5px; width: 100%;}
    .reason .input span{display: inline-block;}
    .reason .input span.right{width: 10%;}
    .reason .input span.left{width: 85%;}
    .reason li{border-bottom:#ddd 1px solid; list-style: none; padding: 5px 10px; position: relative; cursor: pointer;}
    .reason li:hover{background-color: #fff;}

    .pagefun-shenhe:hover{background-color: #000;}
    
</style>
</head>
<body class="pos-r">

<!-- <div class="ui-loading-block" id="loading">
    <div class="ui-loading-cnt">
        <i class="ui-loading-bright"></i>
        <p>正在加载中...</p>
    </div>
</div> -->

<div >
    <nav class="breadcrumb">
        <i class="Hui-iconfont">&#xe67f;</i> <a _href="welcome.html" class="fun-toindex" href="javascript:;">首页</a> 
        <span class="c-gray en">&gt;</span><a href="product-list.html"> 提现管理</a> 
        <span class="c-gray en">&gt;</span> 提现申请列表 
        <a class="btn btn-success radius r mr-20 reload" style="line-height:1.6em;margin-top:3px" href="javascript:;" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
        <span class="r" style="margin-top: -2px; box-sizing: border-box;">
            
            
            <select name="state" id="state" class="select" style="width: auto; height: 31px; vertical-align: middle;">
                <option value="" selected="">审核状态</option>
                <option value="3">不通过</option>
                <option value="2">通过</option>
                
            </select>

            <!-- <div style="display:inline-block; width:380px; position:relative;">
                日期范围：
                <input name="time" type="text" id="date-range1" class="input-text datainp" style="width:300px">
                <i class="Hui-iconfont i-close" id="inputclear">&#xe706;</i>
            </div> -->
    
            <span style="position:relative">
                <input type="text" name="keywords" id="search-input" placeholder="用户名/ID" style="width:250px" class="input-text">
                <i class="Hui-iconfont i-close" id="inputclear">&#xe706;</i>
            </span>

            <button name="" id="search" class="btn btn-success"><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
            <!-- <button id='export' class="btn btn-success">导出EXCEL</button> -->
        </span>
    </nav>
    
   
        
    <div class="pd-10">
        <table class="table table-border table-bordered table-bg table-hover table-sort">
            <thead>
                <tr class="text-c sort0">
                    <th width="40" class="valueid"><input name="" type="checkbox" value=""></th>
                    <th width="40" class="fun-sort2" data-name="w_id" data-flag="0">ID</th>
                    <th width="100">申请者</th>
                    <th width="100">联系电话</th>
                    <th width="80">结算数量</th>
                    
                    <th width="70" class="fun-sort2" data-name="apply_time" data-flag="0">申请时间</th>
                    <th width="70" class="fun-sort2" data-name="check_time" data-flag="0">审核时间</th>

                    <th width="120">当前状态</th>
                </tr>
            </thead>
            <tbody id="content_sp">
              
            </tbody>
        </table>    
    </div>

    <div class="cl pd-5 bg-1 bk-gray mt-20 mb-20" id="operation"> 
<!--         <a href="javascript:;" class="btn btn-warning l mr-10 mt-5 radius fun-all" data-type="stop"><i class="Hui-iconfont">&#xe6de;</i> 批量关闭</a> 
        <a href="javascript:;" class="btn btn-success l mr-10 mt-5 radius fun-all" data-type="start"><i class="Hui-iconfont">&#xe603;</i> 批量开启</a> 
 -->        <a href="javascript:;" class="btn btn-danger l mr-10 mt-5 radius fun-all" data-type="del"><i class="Hui-iconfont">&#xe6e2;</i> 批量删除</a> 
        <span class="r pt-5"  style="line-height: 35px;" id="page"></span>
        <span class="r mr-10"  style="line-height: 40px;" id="dataall"></span>  
    </div>
        
</div>
</div>

<!-- 货物列表模版 -->
<script id="test" type="text/html">
    <% for (x in list) { %>
    <tr class="text-c va-m sort1">
        <td class="valueid"><input name="" type="checkbox" value="<%=list[x].w_id%>"></td>
        <td><%=list[x].w_id%></td>

        <td><%=list[x].user_name%>(<%=list[x].uid%>)</td>
        <td><%=list[x].user_mobile%></td>
        <td><%=list[x].count%></td>
        
        <td><%=list[x].withdrawal_time%></td>

        <td><%=list[x].withdrawal_time%></td>
        


        <td class="td-indexshow">
            
            <%if(list[x].state==2){ %>
                <span style="color:#c62b26; cursor: pointer;">已同意</span>
            <%}else if(list[x].state==3){%>
                <span>已拒绝</span>
                <span><%=list[x].comment%></span>
            <%}else if(list[x].state==1){ %>
               
                

                <span class="label radius pagefun-shenhe" data-index="<%=x%>" data-flag="2" style="cursor: pointer;">通过</span>
                <span class="label radius pagefun-shenhe" data-index="<%=x%>" data-flag="3" style="cursor: pointer;" title="<%=list[x].reason%>">不通过</
               
            <%}%>
        </td>
        
       
    </tr>
    <%}%>  
</script> 
<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script> 
<script type="text/javascript" src="lib/layer/2.1/layer.js"></script>
<script type="text/javascript" src="js/H-ui.js"></script> 
<script type="text/javascript" src="js/H-ui.admin.js"></script> 
<script type="text/javascript" src="js/template-native.js"></script> 
<script type="text/javascript" src="js/s.js"></script> 


<script type="text/javascript" src="lib/laypage/laypage.js"></script> 
<script type="text/javascript" src="lib/daterangepicker/moment.min.js"></script> 
<script type="text/javascript" src="lib/daterangepicker/jquery.daterangepicker.js"></script>
<script src="/Manage/js/lazyload.min.js"></script>
<script type="text/javascript">
var API=API_CASHOUT;
var kk=API_CASHOUT;//用于搜索和上下翻页
var orderby='';
var search='';

loaddata(API,1,true);
// $('#date-range1').dateRangePicker({
//     startOfWeek: 'monday',
//     separator : ' 至 ',
//     format: 'YYYY-MM-DD HH:mm',
//     autoClose: true,
//     time: {
//         enabled: true
//     },
//     defaultTime: moment().startOf('day').toDate(),
//     defaultEndTime: moment().endOf('day').toDate()
// });


$(document).ready(function(){ 

    
        

    // 货物操作、审核/确认收货、拒收
    $(document).on('click','span.pagefun-shenhe',function(){
        var id=$(this).parent().parent().find("td.valueid:first-child input").val();
        var that=$(this);       
        var flag=that.data("flag");

        var tips="";
        flag==2? tips="审核通过" : tips="审核不通过";
        $.post(API_CASHOUTSH,{w_id:id,state:flag},function(data){
            if(!checkStatus(data)) return;
            if(data.status==1){
                that.parent().html(tips);   
                layer.msg(data.info, {icon:1,time:1000});  
            }else{
                layer.msg(data.info, {icon:2,time:1000});
            }
        },'json');  

        // if(flag==2){

        //     layer.use('extend/layer.ext.js', function(){
        //         layer.prompt({
        //             title:'拒绝理由',
        //         },function(val, index){
        //             layer.close(index);

        //             $.post(API_CASHOUTSH,{w_id:id,state:flag},function(data){
        //                 if(!checkStatus(data)) return;
        //                 that.parent().html("审核不通过")
        //                 if(data.status==1){
        //                     that.parent().html("审核通过");   
        //                     layer.msg(data.info, {icon:1,time:1000});   
        //                 }else{
        //                     layer.msg(data.info, {icon:2,time:1000}); 
        //                 }
        //             },'json')
        //         })
        //     })
            
        // }else if(flag==1){
        //     $.post(API_CASHOUTSH,{w_id:id,state:flag},function(data){
        //         if(!checkStatus(data)) return;
        //         if(data.status==1){
        //             that.parent().html("审核通过");   
        //             layer.msg(data.info, {icon:1,time:1000});   
        //         }else{
        //             layer.msg(data.info, {icon:2,time:1000}); 
        //         }
        //     },'json');  
        // }
    })

    


    // 筛选列表
    // var gc;
    // $.getJSON(API_GOODSCLASS,function(data){
    //     if(!checkStatus(data)) return;

    //     gc=data.datas;
    //     if(data==''){
    //         layer.msg('分类出错', {icon:5,time:1000});
    //     }else{
    //         // 罗列一级分类
    //         for(i=0; i<data.datas.length; i++){
    //             $("#cid1").append("<option value='"+data.datas[i].gc_id+"' data-flag='"+i+"'>"+data.datas[i].gc_name+"</option>");
    //         }
    //         //二级菜单联动
    //         $("#cid1").change(function () {
    //             // var ii=$(this).val();
    //             var tt=$("#cid1").val();
    //             if(tt==""){
    //                 $("#cid2").html('<option value="" selected="">全部分类</option>');
    //             }else{
    //                 var ii=$('#cid1 option:selected').data("flag");
    //                 var data2=gc[ii]['child'];
    //                     $("#cid2").empty();
    //                     $("#cid2").append("<option value='0' >全部分类</option>");
    //                 for(j=0; j<data2.length; j++){
    //                     $("#cid2").append("<option value='"+data2[j].gc_id+"' >"+data2[j].gc_name+"</option>");
    //                 }
    //             }
                
    //         });
    //     }   
    // });


    $("#search").click(function(){
        kk=API+"?";
        // var content=encodeURI(document.querySelector('input[name=keywords]').value);
        var param=[
            'k='+encodeURI(document.querySelector('input[name=keywords]').value),
            'state='+document.querySelector('select[name=state]').value,
            

        ];
        search=param.join('&');
        kk=kk+search+'&'+orderby;
        loaddata(kk,1);    
    })

    // $(document).on('click','#export',function(){
    //     var param=[
    //         'k='+encodeURI(document.querySelector('input[name=keywords]').value),
    //         'cid1='+document.querySelector('select[name=cid1]').value,
    //         'cid2='+document.querySelector('select[name=cid2]').value,
    //         't='+document.querySelector('select[name=state]').value,
    //         'time='+document.querySelector('input[name=time]').value,
    //     ];
    //     param=param.join('&');
    //     window.open(API_EXPORT_APPLY+'?'+param);
    //     console.log(API_EXPORT_APPLY+'?'+param)
    // })

    // $(document).on('click','td.searchstore',function(){
    //     var storeid=$(this).data("storeid");
    //     kk=API+"?sid="+storeid;
    //     loaddata(kk,1,true);    
    // })


    

   
    
    
})





        



</script>
</body>
</html>